package com.wwtech.epp.ui.activity.work.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.work.MyDailyActivity;
import com.wwtech.epp.ui.activity.work.contract.MyDailyContract;
import com.wwtech.epp.ui.activity.work.presenter.MyDailyPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.work
 * @Description: The moduele of MyDailyActivity, provide field for MyDailyActivity
 * @date 2017/12/06 14:18:37
 */
@Module
public class MyDailyModule {
    private final MyDailyContract.View mView;


    public MyDailyModule(MyDailyContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public MyDailyPresenter provideMyDailyPresenter(HttpAPIWrapper httpAPIWrapper, MyDailyActivity mActivity) {
        return new MyDailyPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public MyDailyActivity provideMyDailyActivity() {
        return (MyDailyActivity) mView;
    }
}